# src/models/subtitle_schema.py
from sqlalchemy import Column, BigInteger, String, DECIMAL, Text, Integer, TIMESTAMP
from src.models.database import Base

class Subtitle(Base):
    __tablename__ = "d_subtitles"

    id = Column(BigInteger, primary_key=True, autoincrement=True)
    video_id = Column(String(64), nullable=False)
    language = Column(String(2), nullable=False)
    start_time = Column(DECIMAL(10, 3), nullable=False)
    end_time = Column(DECIMAL(10, 3), nullable=False)
    text = Column(Text, nullable=False)
    sequence = Column(Integer, nullable=False)
    created_at = Column(TIMESTAMP, server_default="CURRENT_TIMESTAMP")